/*
 * @lc app=leetcode.cn id=796 lang=javascript
 *
 * [796] 旋转字符串
 */

// @lc code=start
/**
 * @param {string} A
 * @param {string} B
 * @return {boolean}
 */
var rotateString = function(A, B) {
    if(A==B)return true
    if(A.length!==B.length)return false
    let i=A.length
    while(i){
        let temp=A.slice(0,i)
        if(B.includes(temp)){A=A.slice(i).concat(temp) ;return A== B}
        i--
    }
    return false
};
// @lc code=end

//双A法也可以具体不写了